package com.zq.server.admin.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zq.common.utils.SecurityUtils;
import com.zq.server.admin.dao.SysActivityNotifyMapper;
import com.zq.server.admin.domain.SysActivityNotify;
import com.zq.server.admin.service.ISysActivityNotifyService;

/**
 * 操作日志 服务层处理
 * 
 * @author 财哥
 */
@Service
public class ISysActivityNotifyServiceImpl implements ISysActivityNotifyService
{
    @Autowired
    private SysActivityNotifyMapper notifyMapper;

    /**
     * 新增
     * @param  notify 操作日志对象
     */
    @Override
    public void insertNotify(SysActivityNotify notify)
    {
         notifyMapper.insertNotify(notify);
    }

    /**
     * 查询系统操作日志集合
     * 
     * @param  notify 操作日志对象
     * @return 操作日志集合
     */
    @Override
    public List<SysActivityNotify> selectNotifyList(SysActivityNotify  notify)
    {
        notifyMapper.updateNotifyList(SecurityUtils.getWechatUserId());
        return  notifyMapper.selectNotifyList(notify);
    }

    /**
     * 批量删除系统操作日志
     * @param notifyIds 需要删除的操作日志ID
     * @return 结果
     */
    @Override
    public int  deleteNotifyByNotifyIds(Long[] notifyIds)
    {
        return  notifyMapper.deleteNotifyByNotifyIds(notifyIds);
    }

    /**
     * 查询操作日志详细
     * @param notifyId 操作ID
     * @return 操作日志对象
     */
    @Override
    public SysActivityNotify selectNotifyById(Long notifyId)
    {
        return  notifyMapper.selectNotifyById(notifyId);
    }

    /**
     * 查询指定条件条数
     *
     * @param Notify 需要删除的操作日志ID
     * @return 结果
     */
    @Override
    public Integer selectNotifyByIdCount(SysActivityNotify Notify) {
        return notifyMapper.selectNotifyByIdCount(Notify);
    }

    /**
     * 清空操作日志
     */
    @Override
    public void cleanNotify()
    {
         notifyMapper.cleanNotify();
    }
}
